import BasicLayout from '@layout/BasicLayout'
import User from '@views/user/User'
import WorkSpace from '@views/dashboard/WorkSpace'

export const router = [
    {
        path: '/',
        name: 'index',
        component: BasicLayout,
        meta: { title: '首页' },
        redirect: '/user/list',
        children: [
            {
                path: 'user',
                component: User,
                redirect:'/user/list',
                children: [
                    {
                        path: 'list',
                        name: 'list',
                        component: ()=>import('@views/user/UserList') 
                    },
                    {
                        path: 'create',
                        name: 'create',
                        component: ()=>import('@views/user/CreateUser') 
                    }
                ]
            },
            {
                path: '/dashboard',
                //component: User,
                redirect: '/dashboard/workspace',
                children: [
                    {
                        path: 'workspace',
                        component: WorkSpace
                    }
                ]
            }

        ],
    },
    {
        path: '*', redirect: '/404', hidden: true
    }
]